home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / checkbox / registries / hald.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-10-12  |  1.1 KB  |  26 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from checkbox.properties import String
  5. from checkbox.registries.command import CommandRegistry
  6.  
  7. class HaldRegistry(CommandRegistry):
  8.     '''Registry for HAL daemon information.
  9.  
  10.     For the moment, this registry only contains an item for the version
  11.     as returned by the hald command.
  12.     '''
  13.     command = String(default = 'hald --version 2>&1')
  14.     
  15.     def __str__(self):
  16.         str = super(HaldRegistry, self).__str__()
  17.         return str.strip().rsplit(': ')[1]
  18.  
  19.     
  20.     def items(self):
  21.         return [
  22.             ('version', str(self))]
  23.  
  24.  
  25. factory = HaldRegistry
  26.